package com.lysj.bhp.financial.repository;

import com.lysj.bhp.financial.domain.Financial;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.math.BigDecimal;
import java.util.List;

public interface FinancialRepository extends JpaRepository<Financial, Long>, JpaSpecificationExecutor {


    List<Financial> findByStatusAndIsExist(int status, int isExist);


    List<Financial> findByIsOnlineAndStatusAndLeftPortionGreaterThanAndIsExist(Integer isOnline, Integer status, BigDecimal leftPortion, Integer isExist);

    Page<Financial> findByIsOnlineAndIsExist(Integer isOnline, Integer isExist, Pageable pr);
}
